<template>
  <div class="float">
    <div class="cell-wrap">
      <div class="JD">
        <img class="sell" src="images/jdsell.png" alt />
        <!-- <timecountdown style="margin-right:185px"></timecountdown> -->
        <div class="more-sell">
          更多秒杀
          <img
            src="https://wq.360buyimg.com/fd/h5/wxsq_dev/m_jd_index/images/index/arrow_rt.png"
            alt
          />
        </div>
      </div>
      <div class="float-img">
        <div v-for="(item,index) in sellList" :key="index" class="list">
          <img :src="item.url" alt />
          <p class="newprice">￥{{item.newprice}}</p>
          <p class="oldprice">￥{{item.oldprice}}</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
// import timecountdown from "./timecountdown.vue";
import axios from "axios";
export default {
  name: "secondsell",
  components: {
    // "timecountdown": timecountdown
  },
  data() {
    return {
      sellList: []
    };
  },
  created() {
    let that = this;
    axios.get("data/floatitem.json").then(function(response) {
      that.sellList = response.data.result;
      // console.log(that.sellList);
    });
  }
};
</script>
<style>
.oldprice {
  color: #999;
  font-size: 12px;
  line-height: 12px;
  margin: 4px 0 11px;
  text-align: center;
  padding: 0 2px;
  text-decoration: line-through;
}
.newprice {
  margin-top: 10px;
  display: block;
  color: #e93b3d;
  font-size: 16px;
  line-height: 16px;
  height: 16px;
  font-weight: bold;
}
.list {
  display: flex;
  flex-direction: column;
  width: 84px;
  flex-shrink: 0;
  text-align: center;
}
.list img {
  width: 73px;
  margin: 0 auto;
}
.float-img {
  width: 100%;
  overflow: auto;
  display: flex;
  flex-direction: row;
  justify-items: center;
  flex-shrink: 0;
  background-color: #fff;
}
.float-img::-webkit-scrollbar {
  display: none;
}
.cell-wrap {
  margin: 11px;
  border-radius: 5px;
}
.more-sell {
  height: 37px;
  line-height: 37px;
  font-size: 10px;
  color: #f23030;
}
.more-sell img {
  display: inline-block;
  line-height: 37px;
  width: 11px;
  height: 11px;
  margin-right: 8px;
}
.sell {
  display: inline-block;
  width: 69px;
  height: 20px;
  margin-left: 7px;
}
.JD {
  display: flex;
  flex-shrink: 0;
  flex-direction: row;
  border-radius: 8px;
  align-items: center;
  justify-content: space-between;
  height: 37px;
  background: url("../../../public/images/sellback.png") no-repeat;
  background-size: 100%;
  background-color: #fff;
}
.float {
  /* border: red solid 1px; */
  width: 100%;
  /* position: absolute; */
  top: 370px;
  background-color: #f6f6f6;
}
</style>